linear system with 3 variables